/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package desu.nya.animepersistance.utils;

import desu.nya.animepersistance.bo.AnimeBo;
import desu.nya.animepersistance.bo.CommentsBo;
import desu.nya.animepersistance.bo.CoverBo;
import desu.nya.animepersistance.bo.GenreBo;
import desu.nya.animepersistance.bo.OtakuBo;
import desu.nya.animepersistance.bo.impl.AnimeBoImpl;
import desu.nya.animepersistance.bo.impl.CommentsBoImpl;
import desu.nya.animepersistance.bo.impl.CoverBoImpl;
import desu.nya.animepersistance.bo.impl.GenreBoImpl;
import desu.nya.animepersistance.bo.impl.OtakuBoImpl;

/**
 *
 * @author ievstratov
 */
public class AnimeFactory {
    private static AnimeBo animeBo = null;
    private static CommentsBo commentsBo = null;
    private static CoverBo coverBo = null;
    private static GenreBo genreBo = null;
    private static OtakuBo otakuBo = null;
    
    public static AnimeBo getAnimeBo()
    {
        if(animeBo == null) {
            animeBo = new AnimeBoImpl();
        }
        return animeBo;
    }
    
    public static CommentsBo getCommentsBo()
    {
        if(commentsBo == null) {
            commentsBo = new CommentsBoImpl();
        }
        return commentsBo;
    }
    
    public static CoverBo getCoverBo()
    {
        if(coverBo == null) {
            coverBo = new CoverBoImpl();
        }
        return coverBo;
    }
    
    public static GenreBo getGenreBo()
    {
        if(genreBo == null) {
            genreBo = new GenreBoImpl();
        }
        return genreBo;
    }
    
    public static OtakuBo getOtakuBo()
    {
        if(otakuBo == null) {
            otakuBo = new OtakuBoImpl();
        }
        return otakuBo;
    }
}
